package com.proj.android.canyondefense.core.gl;

import android.util.Log;

public class FPSCounter {
    private long _startTime = System.nanoTime();
    private int _frames = 0;
    
    public void logFrame() {
        _frames++;
        if(System.nanoTime() - _startTime >= 1000000000) {
            Log.d("FPSCounter", "logFrame - fps: " + _frames);
            _frames = 0;
            _startTime = System.nanoTime();
        }
    }
}
